package com.neuedu.config.configuration;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;

import java.util.ResourceBundle;

/**
 * server:
 *   port: 80
 * #  servlet:
 * #    context-path: /
 * spring:
 *   application:
 *     name: MyConfig
 *
 * neuedu:
 *   datasource:
 *     user: root
 *     password: 123456
 */
@Configuration
public class YmlConfig {

    @Value("${spring.application.name}")
    private String appName;

    @Value("${server.port}")
    private Integer  serverPort;

    @Value("${neuedu.datasource.user}")
    private String dataUserName;

    @Value("${neuedu.datasource.password}")
    private String dataPassword;


    public String getAppName() {
        return appName;
    }

    public void setAppName(String appName) {
        this.appName = appName;
    }

    public Integer getServerPort() {
        return serverPort;
    }

    public void setServerPort(Integer serverPort) {
        this.serverPort = serverPort;
    }

    public String getDataUserName() {
        return dataUserName;
    }

    public void setDataUserName(String dataUserName) {
        this.dataUserName = dataUserName;
    }

    public String getDataPassword() {
        return dataPassword;
    }

    public void setDataPassword(String dataPassword) {
        this.dataPassword = dataPassword;
    }
}
